Kanzi  3.9.9
Kanzi Android framework API
KanziTextureView Class Reference

KanziTextureView is a specialization of TextureView for embedding Kanzi UI contents. More...

Inheritance diagram for KanziTextureView:
[legend]

Public Member Functions

 KanziTextureView (Context context, String name)
 Simple constructor to use when creating a KanziTextureView from code. More...
 
 KanziTextureView (Context context, AttributeSet attrs)
 Constructor that is called when inflating a KanziTextureView from XML. More...
 
void addListener (KanziViewListener listener)
 Adds state change listener for this view. More...
 
KanziViewAdapter getAdapter ()
 Gets the adapter of this view. More...
 
Domain getDomain ()
 Gets the Domain associated with this view. More...
 
String getName ()
 Gets the name of the view and underlying native view node. More...
 
Node2D getRoot ()
 Returns the root node of this view. More...
 
KanziRuntime getRuntime ()
 Gets the KanziRuntime associated with this view. More...
 
void handleOrientationChange (int orientation)
 Applies device orientation changes to the contents of this view. More...
 
boolean onGenericMotionEvent (MotionEvent event)
 
boolean onKeyDown (int keyCode, KeyEvent event)
 
boolean onKeyUp (int keyCode, KeyEvent event)
 
boolean onTouchEvent (MotionEvent event)
 
void removeListener (KanziViewListener listener)
 Removes state change listener from this view. More...
 
void setClearColor (ColorRGBA color)
 Configures the clear color that is used when rendering of the surface of the view. More...
 
void setKzbPathList (String[] kzbPaths)
 Configures the list of kzb files that are loaded when the view is attached. More...
 
void setName (String name)
 Sets the name for the view and underlying native view node. More...
 
void setRoot (Node2D node)
 Sets the root node of this view, used to manually set content to the view. More...
 
void setStartupPrefabUrl (String url)
 Configures the startup prefab that is automatically loaded during initialization. More...
 

Protected Member Functions

void onAttachedToWindow ()
 
void onDetachedFromWindow ()
 
void onFocusChanged (boolean gainFocus, int direction, Rect previouslyFocusedRect)
 

Detailed Description

KanziTextureView is a specialization of TextureView for embedding Kanzi UI contents.

This view behaves as a regular view allowing it to be moved, transformed, animated and mixed flexibly with Android UI contents. See TextureView. For a more performant alternative, see KanziTextureView.

Constructor & Destructor Documentation

KanziTextureView ( Context  context,
String  name 
)

Simple constructor to use when creating a KanziTextureView from code.

Parameters
contextThe Context the view is running in, through which it can access the current theme, resources, etc.
nameA name for the underlying Kanzi view node.
KanziTextureView ( Context  context,
AttributeSet  attrs 
)

Constructor that is called when inflating a KanziTextureView from XML.

Parameters
contextThe Context the view is running in, through which it can access the current theme, resources, etc.
attrsThe attributes of the XML tag that is inflating the view.

Member Function Documentation

void addListener ( KanziViewListener  listener)

Adds state change listener for this view.

Parameters
listenerListener to be called when events occur.

Implements KanziView.

KanziViewAdapter getAdapter ( )

Gets the adapter of this view.

Returns
Kanzi view adapter of this view.

Implements KanziView.

Domain getDomain ( )

Gets the Domain associated with this view.

Returns
Domain associated with this view.

Implements KanziView.

String getName ( )

Gets the name of the view and underlying native view node.

Returns
Name of the view.

Implements KanziView.

Node2D getRoot ( )

Returns the root node of this view.

Returns
Root node of this view.

Implements KanziView.

KanziRuntime getRuntime ( )

Gets the KanziRuntime associated with this view.

Returns
KanziRuntime associated with this view.

Implements KanziView.

void handleOrientationChange ( int  orientation)

Applies device orientation changes to the contents of this view.

Parameters
orientationThe orientation qualifier from onOrientationChanged().

Implements KanziView.

void removeListener ( KanziViewListener  listener)

Removes state change listener from this view.

Parameters
listenerListener to remove.

Implements KanziView.

void setClearColor ( ColorRGBA  color)

Configures the clear color that is used when rendering of the surface of the view.

Parameters
colorColor used to clear the surface of the view. Use null to skip clearing.

Implements KanziView.

void setKzbPathList ( String[]  kzbPaths)

Configures the list of kzb files that are loaded when the view is attached.

Parameters
kzbPathsArray of kzb paths to load.

Implements KanziView.

void setName ( String  name)

Sets the name for the view and underlying native view node.

Parameters
nameNew name for the view.

Implements KanziView.

void setRoot ( Node2D  node)

Sets the root node of this view, used to manually set content to the view.

Parameters
nodeNode to be displayed in this view.

Implements KanziView.

void setStartupPrefabUrl ( String  url)

Configures the startup prefab that is automatically loaded during initialization.

Parameters
urlUrl of the prefab template to load.

Implements KanziView.